package com.lam.generator.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.components.dict.annotation.Dict;
import com.lam.common.components.easyexcel.converter.DictConverter;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.validate.annotation.DictValid;
import com.lam.common.validate.group.Add;

/**
 * 代码模块对象 gen_code_module
 * 
 * @author admin
 * @date 2022-11-01
 */
@DictCheck
@ColumnWidth(30)
@TableName("gen_code_module")
public class GenCodeModule implements BaseEntity{

    /** 主键 */
    @ExcelIgnore
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.AUTO)
    private String id;
    
    /** 项目模块 */
    @ExcelProperty("项目模块")
    @NotBlank(message = "项目模块不能为空")
    @Size(max = 200, message = "项目模块长度不能超过200个字符")
    private String projectModule;

    /** 模块 */
    @ExcelProperty("模块")
    @NotBlank(message = "模块不能为空")
    @Size(max = 200, message = "模块长度不能超过200个字符")
    private String module;

    /** 模块简写 */
    @ExcelProperty("模块简写")
    @NotBlank(message = "模块简写不能为空")
    @Size(max = 100, message = "模块简写长度不能超过100个字符")
    private String moduleShort;

    /** 模块名 */
    @ExcelProperty("模块名")
    @NotBlank(message = "模块名不能为空")
    @Size(max = 200, message = "模块名长度不能超过200个字符")
    private String moduleName;

    /** 包名 */
    @ExcelProperty("包名")
    @NotBlank(message = "包名不能为空")
    @Size(max = 200, message = "包名长度不能超过200个字符")
    private String packageName;

    /** 表前缀 */
    @ExcelProperty("表前缀")
    @NotBlank(message = "表前缀不能为空")
    @Size(max = 100, message = "表前缀长度不能超过100个字符")
    private String tablePrefix;

    /** UI组件位置 */
    @ExcelProperty("UI组件位置")
    @Size(max = 200, message = "UI组件位置长度不能超过200个字符")
    private String uiPath;

    /** 状态（1启用 0停用） */
    @ExcelProperty(value = "状态", converter = DictConverter.class)
    @NotNull(message = "状态不能为空")
    @DictValid(message = "无效的状态")
    @Dict(dictCode = "status_type")
    private Integer status;

    /** 创建人 */
    @ExcelProperty("创建人")
    private String createBy;

    /** 创建时间 */
    @ExcelProperty("创建时间")
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 修改人 */
    @ExcelProperty("修改人")
    private String updateBy;

    /** 修改时间 */
    @ExcelProperty("修改时间")
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /** 备注 */
    @ExcelProperty("备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setProjectModule(String projectModule) {
        this.projectModule = projectModule;
    }

    public String getProjectModule() {
        return projectModule;
    }    
    
    public void setModule(String module) {
        this.module = module;
    }

    public String getModule() {
        return module;
    }    
    
    public void setModuleShort(String moduleShort) {
        this.moduleShort = moduleShort;
    }

    public String getModuleShort() {
        return moduleShort;
    }    
    
    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public String getModuleName() {
        return moduleName;
    }    
    
    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getPackageName() {
        return packageName;
    }    
    
    public void setTablePrefix(String tablePrefix) {
        this.tablePrefix = tablePrefix;
    }

    public String getTablePrefix() {
        return tablePrefix;
    }    
    
    public void setUiPath(String uiPath) {
        this.uiPath = uiPath;
    }

    public String getUiPath() {
        return uiPath;
    }    
    
    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }    
    
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateBy() {
        return createBy;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }    
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }    
    
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }    
    

}
